package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 商品分类
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_commodity_classification")
public class CommodityClassification extends Model<CommodityClassification> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "classification_code", type = IdType.ASSIGN_ID)
    private String classificationCode;
    /**
     * 父级编码
     */
    @TableField("parent_code")
    private String parentCode;
    /**
     * 分类名称
     */
    @TableField("classification_name")
    private String classificationName;
    /**
     * 排序
     */
    @TableField("idx")
    private Integer idx;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
    /**
     * 操作人
     */
    @TableField("operator")
    private String operator;
    /**
     * 机构ID
     */
    @TableField("org_id")
    private String orgId;

    public void freeData() {
        this.classificationCode = null;
        this.parentCode = null;
        this.classificationName = null;
        this.idx = null;
        this.addTime = null;
        this.updateTime = null;
        this.operator = null;
        this.orgId = null;
    }

}
